package service

import (
	"github.com/3.27/global"
	"github.com/3.27/internal/model/dao"
)

func CheckMobilIsExistsByUser(mobile string) (*dao.User, error) {

	var user dao.User
	err := global.DB.Where("mobile = ?", mobile).First(&user).Error
	if err != nil {
		return nil, err
	}
	return &user, nil

}
